#ifndef LINEAR
#define LINEAR

#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>

#define TABLE_SIZE 13
#define NULLKEY -1
#define DELKEY -2

typedef int KeyType;

typedef struct
{
	KeyType key;
	int count;
}HashNode;

typedef struct
{
	HashNode table[TABLE_SIZE];
	int elem_num;
	int m, p;
}HashTable;

void ht_init (HashTable **, int, int);
void ht_create (HashTable *, KeyType *, int);
void ht_print (HashTable *);
void ht_destroy (HashTable *);
bool ht_insert (HashTable *, KeyType);
bool ht_delete (HashTable *, KeyType);
void ht_search (HashTable *, KeyType);
void ASL (HashTable *);

#endif
